// phalanx size.hpp.cu header file

// Copyright (c) 2010 - 2011 Kohei Takahashi (Flast).
// Distributed under the MIT license. for more detail see COPYING.

#ifndef IG_PHALANX_FUNCTIONAL_SIZE_HPP_CU_ONCE_
#define IG_PHALANX_FUNCTIONAL_SIZE_HPP_CU_ONCE_

#include <phalanx/config.hpp.cu>

#include <cstddef>

#include <phalanx/type_traits/builtin_traits.hpp.cu>

namespace phalanx
{

template < typename V >
PHALANX_CONFIG_DEFAULT_FUNCTION( true )
std::size_t
size( const volatile V & )
{ return vector_type_traits< V >::size_value; }


template < typename T, ::std::size_t n_ >
PHALANX_CONFIG_DEFAULT_FUNCTION( true )
std::size_t
size( T ( & )[ n_ ] )
{ return n_; }

} // namespace phalanx

#endif // IG_PHALANX_FUNCTIONAL_SIZE_HPP_CU_ONCE_

